<cfsilent>
<!---
Copyright: (c) 2006 The MachBlog Authors
Authors: Matt Woodward (mpwoodward@gmail.com) & Peter J. Farrell (pjf@maestropublishing.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at 

http://www.apache.org/licenses/LICENSE-2.0 

Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions and 
limitations under the License.

$Id: aggregatorForm.cfm 966 2006-10-26 06:39:06Z mpwoodward $

Notes:
--->
</cfsilent>

<cfoutput>
<h2>
	<cfif aggregator.getAggregatorId() EQ "">
		#getProperty("resourceBundleService").getResourceBundle().getResource("createaggregator")#
	<cfelse>
		#getProperty("resourceBundleService").getResourceBundle().getResource("updateaggregator")#
	</cfif>
</h2>

<cfif event.isArgDefined("message")>
	<p>#event.getArg("message")#</p>
</cfif>

<form name="aggregatorForm" action="index.cfm?#getProperty('eventParameter')#=processAggregatorForm" method="post">
	<table border="0" width="100%" cellpadding="2" cellspacing="1">
		<tr>
			<td align="right">* #getProperty("resourceBundleService").getResourceBundle().getResource("aggregatorname")#</td>
			<td>
				<input type="text" name="aggregatorName" size="30" maxlength="100" 
						value="#variables.aggregator.getAggregatorName()#" />
			</td>
		</tr>
		<tr>
			<td align="right" valign="top">#getProperty("resourceBundleService").getResourceBundle().getResource("description")#</td>
			<td valign="top">
				<textarea name="aggregatorDescription" cols="38" rows="8">#variables.aggregator.getAggregatorDescription()#</textarea>
			</td>
		</tr>
		<tr>
			<td align="right">* #getProperty("resourceBundleService").getResourceBundle().getResource("aggregatorurl")#</td>
			<td>
				<input type="text" name="aggregatorUrl" size="30" maxlength="100" 
						value="#variables.aggregator.getAggregatorUrl()#" />
			</td>
		</tr>
		<tr>
			<td align="right">* #getProperty("resourceBundleService").getResourceBundle().getResource("pingurl")#</td>
			<td>
				<input type="text" name="pingUrl" size="30" maxlength="250" 
						value="#variables.aggregator.getPingUrl()#" />
			</td>
		</tr>
		<tr>
			<td align="right">#getProperty("resourceBundleService").getResourceBundle().getResource("autoping")#</td>
			<td>
				<input type="checkbox" name="autoPing" value="1"<cfif variables.aggregator.getAutoPing() EQ 1> checked</cfif> />
			</td>
		</tr>
		<tr>
			<td align="right">#getProperty("resourceBundleService").getResourceBundle().getResource("makeactive")#</td>
			<td>
				<input type="checkbox" name="isActive" value="1"<cfif variables.aggregator.getAudit().getIsActive() EQ 1> checked</cfif> />
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="submit" 
						value="<cfif aggregator.getAggregatorId() EQ "">#getProperty('resourceBundleService').getResourceBundle().getResource('createaggregator')#<cfelse>#getProperty('resourceBundleService').getResourceBundle().getResource('updateaggregator')#</cfif>" />
			</td>
		</tr>
	</table>
	
	<input type="hidden" name="aggregatorId" value="#variables.aggregator.getAggregatorId()#" />
</form>
<script type="text/javascript">
	// form validation
	objForm = new qForm("aggregatorForm");

	// set required fields and do additional validation
	objForm.aggregatorName.required = true;
	objForm.aggregatorName.validateNotEmpty();
	objForm.aggregatorName.description = "#getProperty('resourceBundleService').getResourceBundle().getResource('categoryname')#";
	objForm.aggregatorDescription.required = false;
	objForm.aggregatorDescription.validateNotEmpty();
	objForm.aggregatorDescription.description = "#getProperty('resourceBundleService').getResourceBundle().getResource('description')#";
	objForm.aggregatorUrl.required = true;
	objForm.aggregatorUrl.validateNotEmpty();
	objForm.aggregatorUrl.description = "#getProperty('resourceBundleService').getResourceBundle().getResource('aggregatorurl')#";
	objForm.pingUrl.required = true;
	objForm.pingUrl.validateNotEmpty();
	objForm.pingUrl.description = "#getProperty('resourceBundleService').getResourceBundle().getResource('pingurl')#";
</script>
</cfoutput>